package rocketman;
/*
Copyright (C) <year> <name of author>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import java.util.*;
import java.awt.Graphics2D;

public class LevelStateLevel3 implements LevelState 
{
private LinkedList<Enemy> enemies;
private LinkedList<Sprite> sprites;
private AIengine aiengine;
private int activationPixel = 0;//NOTE: doubled in class Game()
private Room room;
private LinkedList<Sprite> codecs;
private int spritecount = 3;

public void setData(LinkedList<Enemy> e, LinkedList<Sprite> s, AIengine aie, Room r, LinkedList<Sprite> c, int spritecnt)
{
	enemies = e;
	sprites = s;
	aiengine = aie;
	room = r;
	codecs = c;
	spritecount = spritecnt;
	//NOTE instanceof rooms
	if (room == null || (room instanceof Room1) || (room instanceof Room2))
		room = new Room3(enemies,aiengine);
}

public void eventloop(Graphics2D g2d)
{
	activationPixel--;
      if (activationPixel == -10) {
	//test aiengine.messageEngine("123");
	room.addPart0(enemies,sprites,aiengine);
       }
      else if (activationPixel == -14) {
	room.addPart1(enemies,sprites,aiengine);
       }
      else if (activationPixel == -18) {
	room.addPart1(enemies,sprites,aiengine);
       }
      else if (activationPixel == -22) {
	room.addPart1(enemies,sprites,aiengine);
       }
      else if (activationPixel == -26) {
	room.addPart1(enemies,sprites,aiengine);
       }
      else if (activationPixel == -30) {
	room.addPart1(enemies,sprites,aiengine);
       }
}

public void setMapX(double mx)
{}
};

